package test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import pojo.Person;

public class demo03 {
    public static void main(String[] args) {
        ApplicationContext alc = new ClassPathXmlApplicationContext("applicationContext.xml");
        Person ch = alc.getBean("person", Person.class);
        ch.eat();
        Person jap = alc.getBean("person1", Person.class);
        jap.eat();

    }
}
